package com.example.service;

import com.example.service.impl.ProductFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

@FeignClient(name = "eshop-product-server",fallback = ProductFallBack.class)
public interface ProductClient {
    @GetMapping("product/{proId}")
    public String getPro(@PathVariable("proId") Integer proId);
    @GetMapping("product/getAll")
    public String getAllPro();
    @GetMapping("product/getPorPrice/{proId}")
    public Map getProPrice(@PathVariable("proId") Integer proId);
}
